package com.artron.mediaartron.data.net.api;

import com.artron.baselib.entity.Response;
import com.artron.mediaartron.data.entity.AliPayResult;
import com.artron.mediaartron.data.entity.WeChatData;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;
import rx.functions.Func1;

import static com.umeng.analytics.pro.x.W;

/**
 * Class description here
 *
 * @author doing
 * @version 1.0.0
 * @since 2017-10-26.
 */

public interface HostApi {

    @GET("alipay/createAlipayOrder")
    Observable<Response<String>> getAlipayData(@Query("orderCode") String orderCode, @Query("totalFee") String totalFee,
                                               @Query("worksName") String worksName);

    @GET("wechat/createWeChatMobilePayOrder")
    Observable<Response<WeChatData>> getWeChatData(@Query("orderCode") String orderCode, @Query("totalFee") String totalFee);

    @POST("trolleyDetail/batchUpdateTrolleyDetailStatus/{passportId}")
    Observable<Response> deleteShoppingCartItem(@Path("passportId") String passportId, @Query("ids") String ids);

    @FormUrlEncoded
    @POST("trolleyDetail/saveTrolleyDetail")
    Observable<Response> saveTrolleyDetail(@Field("passportId") String passportId, @Field("worksId") String worksId,
                                           @Field("quantity") int quantity, @Field("skuCode") String skuCode,
                                           @Field("channelCode") String channelCode, @Field("clientCode") String clientCode);

    @POST("feedback/saveFeedback")
    Observable<Response> saveFeedback(@Query("passId") String passId, @Query("comment") String comment, @Query("contact") String contact,
                                      @Query("appVersion") String appVersion, @Query("clientDevice") String clientDevice,
                                      @Query("clientOs") String clientOs);

    @GET("/express/queryExpress/{orderCode}")
    Observable<Response> queryExpress(@Path("orderCode") String orderCode);
}
